home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / oops / r3semaph.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  1.5 KB  |  66 lines

  1.  
  2. // JavaScript wrapper for r3semaph.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_SEMAPHORE_H = 1;
  7. include("oops/r3root.js")
  8.  
  9.  
  10. var R3CLID_SEMAPHORE = 3;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Obtain semaphore. If semaphore is obtained, call return immediately. If not, the thread is
  16. //      put to sleep.
  17. // p3: Integer, see access types below
  18.  
  19. R3SEMM_OBTAIN = 3000;
  20.  
  21. function mR3SEMM_OBTAIN(p3) {
  22.   DoA(this.r3obj, 3000, p3, R3TID_INTEGER, 0);
  23. }
  24.  
  25. // Description: Attemp to lock semaphore. If cannot be locked, call return immediately with FALSE return
  26. //      value. Otherwise the semaphore is locked and TRUE is returned.
  27. // Returns: Boolean, FALSE if semaphore cannot be locked by us
  28. // p3: Integer, see access types below
  29.  
  30. R3SEMM_ATTEMPT = 3001;
  31.  
  32. function mR3SEMM_ATTEMPT(p3) {
  33.   return   DoA(this.r3obj, 3001, p3, R3TID_INTEGER, 0);
  34. }
  35.  
  36. // Description: Release semaphore locked using ATTEMP or OBTAIN methods
  37.  
  38. R3SEMM_RELEASE = 3002;
  39.  
  40. function mR3SEMM_RELEASE() {
  41.   DoA(this.r3obj, 3002, 0, R3TID_INTEGER, 0);
  42. }
  43.  
  44.  
  45.  
  46.  
  47. var R3SEMA_Task = 3502; // Object
  48. var R3SEM_SHARED = 0;
  49. var R3SEM_EXCLUSIVE = 1;
  50.  
  51.  
  52. function r3Semaphore () { 
  53.    this.base = r3God;
  54.    if(arguments.length) {
  55.       this.base(R3CLID_SEMAPHORE, arguments);
  56.    }
  57.    // Methods
  58.    this.OBTAIN=mR3SEMM_OBTAIN;
  59.    this.ATTEMPT=mR3SEMM_ATTEMPT;
  60.    this.RELEASE=mR3SEMM_RELEASE;
  61.  
  62.    // Attributes
  63. }
  64.  
  65. r3Semaphore.prototype=new r3Root;
  66. // r3semaph.h_H